{include file='_header'}



<style>

    .tabs-container .tab-pane .panel-body {border-left: none; border-right: none; border-bottom: none;}

</style>



<form action="" method="post" class="form-horizontal form-validate" enctype="multipart/form-data" >

    <div class="page-header">

        当前位置：<span class="text-primary">支付方式</span>

    </div>

<div class="page-content">

    <!-- {if empty($resp['code'])}

    <div class="alert alert-danger">

        <p style="font-size:18px;font-weight: bold;word-break: break-all">{$url} 访问受限, 请检查您的服务器设置</p>

        <p style="font-size:18px;font-weight: bold;word-break: break-all">HTTP 错误代码: {$resp['message']}</p>

    </div>

    {/if} -->

    <div class="tabs-container">
        <ul class="nav nav-tabs" id="myTab">
            <!-- <li class="active"><a href="#tab_wechat">微信端支付</a></li>
            <li><a href="#tab_wap">wap端支付</a></li> -->
            <li class="active"><a href="#tab_app">APP支付</a></li>
            <li><a href="#tab_alipay">微信打款</a></li>
            <li><a href="#tab_paytype">打款方式</a></li>
        </ul>
        <div class="tab-content ">
            <!-- 微信端开始-->
            <div class="tab-pane" id="tab_wechat">
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">微信jsapi支付</h4>
                            <span> 开启后在微信中可以调起微信进行支付</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch"  name="data[wx_wechat]"  value="1" {if $data['wx_wechat']==1}checked{/if} />
                        </div>
                    </div>
                    <div class="panel-body" id="wx_wechat" {if empty($data['wx_wechat'])}style="display:none"{/if}>
                        <div class="form-group" >
                            <label class="col-lg control-label must">微信AppId(公众号)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[wx_wechat_appid]" class="form-control" value="{if !empty($sec['wx_wechat']['appid'])}{$sec['wx_wechat']['appid']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">应用密钥(AppSecret)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[wx_wechat_appsecret]" class="form-control" value="{if !empty($sec['wx_wechat']['appsecret'])}{$sec['wx_wechat']['appsecret']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">微信商户名称</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[wx_wechat_merchname]" class="form-control" value="{if !empty($sec['wx_wechat']['merchname'])}{$sec['wx_wechat']['merchname']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">服务商支付商户号(Mch_Id)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[wx_wechat_merchid]" class="form-control" value="{if !empty($sec['wx_wechat']['merchid'])}{$sec['wx_wechat']['merchid']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">支付密钥(APIKEY)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[wx_wechat_apikey]" class="form-control" value="{if !empty($sec['wx_wechat']['apikey'])}{$sec['wx_wechat']['apikey']}{/if}"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--微信端 结束-->
            <!-- 微信端开始-->
            <div class="tab-pane" id="tab_wap">
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">微信h5支付</h4>
                            <span> 开启后在手机浏览器中可以调起微信进行支付</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch"  name="data[web_wechat]"  value="1" {if $data['web_wechat']==1}checked{/if} />
                        </div>
                    </div>
                    <div class="panel-body" id="web_wechat" {if empty($data['web_wechat'])}style="display:none"{/if}>
                        <div class="form-group" >
                            <label class="col-lg control-label must">微信AppId</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[web_wechat_appid]" class="form-control" value="{if !empty($sec['web_wechat']['appid'])}{$sec['web_wechat']['appid']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">应用密钥(AppSecret)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[web_wechat_appsecret]" class="form-control" value="{if !empty($sec['web_wechat']['appsecret'])}{$sec['web_wechat']['appsecret']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">微信商户名称</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[web_wechat_merchname]" class="form-control" value="{if !empty($sec['web_wechat']['merchname'])}{$sec['web_wechat']['merchname']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">服务商支付商户号(Mch_Id)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[web_wechat_merchid]" class="form-control" value="{if !empty($sec['web_wechat']['merchid'])}{$sec['web_wechat']['merchid']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">支付密钥(APIKEY)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[web_wechat_apikey]" class="form-control" value="{if !empty($sec['web_wechat']['apikey'])}{$sec['web_wechat']['apikey']}{/if}"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--微信端 结束-->
            <!--app端开始-->
            <div class="tab-pane active" id="tab_app">
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">微信支付</h4>
                            <span> 开启后在APP中可以调起微信进行支付</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch"  name="data[app_wechat]"  value="1" {if $data['app_wechat']==1}checked{/if} />
                        </div>
                    </div>
                    <div class="panel-body" id="app_wechat" {if empty($data['app_wechat'])}style="display:none"{/if}>
                        <div class="form-group" >
                            <label class="col-lg control-label must">微信AppId</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[app_wechat_appid]" class="form-control" value="{if !empty($sec['app_wechat']['appid'])}{$sec['app_wechat']['appid']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">应用密钥(AppSecret)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[app_wechat_appsecret]" class="form-control" value="{if !empty($sec['app_wechat']['appsecret'])}{$sec['app_wechat']['appsecret']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">微信商户名称</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[app_wechat_merchname]" class="form-control" value="{if !empty($sec['app_wechat']['merchname'])}{$sec['app_wechat']['merchname']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">服务商支付商户号(Mch_Id)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[app_wechat_merchid]" class="form-control" value="{if !empty($sec['app_wechat']['merchid'])}{$sec['app_wechat']['merchid']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">支付密钥(APIKEY)</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[app_wechat_apikey]" class="form-control" value="{if !empty($sec['app_wechat']['apikey'])}{$sec['app_wechat']['apikey']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group cert">
                            <label class="col-lg control-label">CERT证书文件</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="file" name="cert_file" class="form-control" />
                                <span class="help-block">
                                {if !empty($sec['app_wechat']['cert_file'])}
                                <span class='label label-success'>已上传</span>
                                {else}
                                <span class='label label-danger'>未上传</span>
                                {/if}
                                下载证书 cert.zip 中的 apiclient_cert.pem 文件</span>
                            </div>
                        </div>
                        <div class="form-group cert">
                            <label class="col-lg control-label">KEY密钥文件</label>
                            <div class="col-sm-9 col-xs-12">
                                <input type="file" name="key_file" class="form-control" />
                                <span class="help-block">
                                   {if !empty($sec['app_wechat']['key_file'])}
                                    <span class='label label-success'>已上传</span>
                                    {else}
                                    <span class='label label-danger'>未上传</span>
                                    {/if}
                                    下载证书 cert.zip 中的 apiclient_key.pem 文件
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">支付宝支付</h4>
                            <span> 开启后在APP中可以调起支付宝进行支付</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch" name="data[app_alipay]"  value="1" {if $data['app_alipay']==1}checked{/if} />
                        </div>
                    </div>
                    <div class="panel-body" id="app_alipay" {if empty($data['app_alipay'])}style="display:none"{/if}>
                        <div class="form-group" >
                            <label class="col-lg control-label must">APPID</label>
                            <div class="col-sm-9">
                                <input class="form-control" name="data[app_alipay_appid]" value="{if !empty($sec['app_alipay']['appid'])}{$sec['app_alipay']['appid']}{/if}" />
                                <div class="help-block">开放平台应用id</div>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">支付宝公钥(public_key)</label>
                            <div class="col-sm-9">
                                <textarea name="data[app_alipay_public_key]" rows="4" class="form-control">{if !empty($sec['app_alipay']['public_key'])}{$sec['app_alipay']['public_key']}{/if}</textarea>
                                <div class="help-block">一行且不能有空格</div>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">应用私钥(private_key)</label>
                            <div class="col-sm-9">
                                <textarea name="data[app_alipay_private_key]" rows="4" class="form-control">{if !empty($sec['app_alipay']['private_key'])}{$sec['app_alipay']['private_key']}{/if}</textarea>
                                <div class="help-block">一行且不能有空格</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">余额支付</h4>
                            <span>开启后，粉丝可以用账户余额去商城消费.</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch"  name="data[credit]"  value="1" {if $data['credit']==1}checked{/if} />
                        </div>
                    </div>
                </div>
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">货到付款</h4>
                            <span>如果要支持货到付款，也需要将商品设置成货到付款。</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch" name="data[cash]" value="1" {if $data['cash']==1}checked{/if} />
                        </div>
                    </div>
                </div>
            </div>
            <!--app端结束-->
            <!--支付宝打款 开始-->
            <div class="tab-pane " id="tab_alipay">
                <div class="panel panel-default" >
                    <div class="panel-body">
                        <div class="col-sm-9 col-xs-12">
                            <h4 class="set_title">微信打款</h4>
                            <span> 开启之后,提现打款,可以使用支付宝(前提是要登录支付宝)</span>
                        </div>
                        <div class="col-lg pull-right" style="padding-top:10px;text-align: right" >
                            <input type="checkbox" class="js-switch"  name="data[alipay][open]"  value="1" {if !empty($sec['alipay']['open'])}checked{/if} />
                        </div>
                    </div>
                    <div class="panel-body" id="alipay" {if empty($sec['alipay']['open'])}style="display:none"{/if}>
                        <div class="form-group" >
                            <label class="col-lg control-label must">合作伙伴身份（PID）</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[alipay][partner]" class="form-control" value="{if !empty($sec['alipay']['partner'])}{$sec['alipay']['partner']}{/if}"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">支付账户姓名</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[alipay][account_name]" class="form-control" value="{if !empty($sec['alipay']['account_name'])}{$sec['alipay']['account_name']}{/if}"/>
                                <div class="help-block">支付宝实名认证的名称(个人就填写个人姓名,企业就填写企业名称 , 要与支付宝上面的认证姓名一致)</div>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">支付账号</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[alipay][email]" class="form-control" value="{if !empty($sec['alipay']['email'])}{$sec['alipay']['email']}{/if}"/>
                                <div class="help-block">支付宝账号 一般是 email </div>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg control-label must">MD5秘钥</label>
                            <div class="col-sm-9">
                                <input type="text" name="data[alipay][key]" class="form-control" value="{if !empty($sec['alipay']['key'])}{$sec['alipay']['key']}{/if}"/>
                                <div class="help-block">安全校验码(key)MD5密钥 </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--支付宝打款 结束-->
            <!--微信打款方式 开始-->
            <div class="tab-pane " id="tab_paytype">
                <div class="panel-body">
                    <div class="form-group" >
                        <label class="col-lg control-label must">提现申请</label>
                        <div class="col-sm-9">
                            <label class="radio-inline"><input type="radio" name="data[paytype][withdraw]" value="0" {if empty($data['paytype']['withdraw'])}checked="checked"{/if}/>企业打款</label>
                            <label class="radio-inline"><input type="radio" name="data[paytype][withdraw]" value="1" {if $data['paytype']['withdraw'] == '1'}checked="checked"{/if}/>红包付款</label>
                            <span class="help-block">一般 小额打款 可以用微信红包 建议使用微信打款金额 超过1000</span>
                        </div>
                    </div>
                    <div class="form-group" >
                        <label class="col-lg control-label must">红包金额</label>
                        <div class="col-sm-9">
                            <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="0" {if empty($data['paytype']['redpack'])}checked="checked"{/if}/>188元</label>
                            <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="1" {if $data['paytype']['redpack'] == '1'}checked="checked"{/if}/>288元</label>
                            <label class="radio-inline"><input type="radio" name="data[paytype][redpack]" value="2" {if $data['paytype']['redpack'] == '2'}checked="checked"{/if}/>388元</label>
                            <span class="help-block">如果选用 红包打款 , 请选择每个红包最大面值;<br/>如果是 申请额度是 500 元 选择的是 188元 红包 将会发送 两个188元红包 和 一个 124元 红包</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <span class="">
        <input type="submit" value="提交" class="btn btn-primary"  />
    </span>
</form>
</div>

<script type="text/javascript">
    require(['bootstrap'], function () {
        $('#myTab a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        })
    });
    $(function () {
        $(":checkbox[name='data[app_wechat]']").click(function () {
            if ($(this).prop('checked')) {
                $("#app_wechat").show();
            }
            else {
                $("#app_wechat").hide();
            }
        });
        $(":checkbox[name='data[wx_wechat]']").click(function () {
            if ($(this).prop('checked')) {
                $("#wx_wechat").show();
            }
            else {
                $("#wx_wechat").hide();
            }
        });
        $(":checkbox[name='data[web_wechat]']").click(function () {
            if ($(this).prop('checked')) {
                $("#web_wechat").show();
            }
            else {
                $("#web_wechat").hide();
            }
        });
        $(":checkbox[name='data[app_alipay]']").click(function () {
            if ($(this).prop('checked')) {
                $("#app_alipay").show();
            }
            else {
                $("#app_alipay").hide();
            }
        });
        $(":checkbox[name='data[alipay][open]']").click(function () {
            if ($(this).prop('checked')) {
                $("#alipay").show();
            }
            else {
                $("#alipay").hide();
            }
        });
    })
</script>
{include file='_footer'}